package com.mtz.dateobject;

import com.mtz.enums.DeleteEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * 答案表
 * @author 煜赜
 * @date 2018/11/21 9:52
 */
@Data
@Entity
@DynamicUpdate
@DynamicInsert
public class Answer {

    /** 答案id **/
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /** 答案描述 **/
    private String answer;

    /** 答案被选中次数 **/
    private Integer hitCount;

    /** 关联的问题id **/
    private Integer questionId;

    /** 修改人 **/
    private String author;

    /** 答案视角 **/
    private Integer angle;

    /** 信息状态(0未删除,1已删除) **/
    private Integer isDeleted = DeleteEnum.UN_CHECKED.getCode();

    private Date createTime;

    private Date updateTime;
}
